<?php

/**
 * GestorRegistraGasto form base class.
 *
 * @package    programaTio
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseGestorRegistraGastoForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'gestor_id'     => new sfWidgetFormInputHidden(),
      'pedido_id'     => new sfWidgetFormPropelChoice(array('model' => 'Pedido', 'add_empty' => true)),
      'tipoGasto_id'  => new sfWidgetFormPropelChoice(array('model' => 'Tipogasto', 'add_empty' => true)),
      'concepto'      => new sfWidgetFormInput(),
      'importe'       => new sfWidgetFormInput(),
      'monto'         => new sfWidgetFormInput(),
      'numeroFactura' => new sfWidgetFormInput(),
      'created_at'    => new sfWidgetFormDateTime(),
      'updated_at'    => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'gestor_id'     => new sfValidatorPropelChoice(array('model' => 'Gestor', 'column' => 'id', 'required' => false)),
      'pedido_id'     => new sfValidatorPropelChoice(array('model' => 'Pedido', 'column' => 'id', 'required' => false)),
      'tipoGasto_id'  => new sfValidatorPropelChoice(array('model' => 'Tipogasto', 'column' => 'id', 'required' => false)),
      'concepto'      => new sfValidatorString(array('max_length' => 45)),
      'importe'       => new sfValidatorString(array('max_length' => 45)),
      'monto'         => new sfValidatorString(array('max_length' => 45)),
      'numeroFactura' => new sfValidatorString(array('max_length' => 45, 'required' => false)),
      'created_at'    => new sfValidatorDateTime(array('required' => false)),
      'updated_at'    => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('gestor_registra_gasto[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'GestorRegistraGasto';
  }


}
